<?php
/**
 * Created by JetBrains PhpStorm.
 * User: zhouyang
 * Date: 13-9-8
 * Time: 下午4:31
 * To change this template use File | Settings | File Templates.
 */
class SourcesDB  extends DBReader{

    //根据source_id source 信息
    public function get($source_id){

        $sql = 'select source_id, title, site_address from sources where source_id = :source_id';

        return $this->db()->getRow($sql,array('source_id'=>$source_id));
    }

    //批量获取来源信息
    public function mulitGetSourceInfo($source_ids){

        $sql = 'select source_id, title, site_address from sources where source_id in('.$source_ids.')';

        return $this->db()->getAll($sql);
    }
}